package cn.com.code.design.engine;

import cn.com.code.design.logic.impl.UserAgeFilter;
import cn.com.code.design.logic.impl.UserGenderFilter;
import cn.com.code.design.logic.LogicFilter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 决策节点配置
 * @author zhengpei
 * @date 2021/9/27
 */
public class EngineConfig {

  public static Map<String, LogicFilter> logicFilterMap;

  static {
    logicFilterMap = new ConcurrentHashMap<>();
    logicFilterMap.put("userAge",new UserAgeFilter());
    logicFilterMap.put("userGender", new UserGenderFilter());
  }

  public Map<String, LogicFilter> getLogicFilterMap() {
    return logicFilterMap;
  }

  public void setLogicFilterMap(Map<String, LogicFilter> logicFilterMap) {
    EngineConfig.logicFilterMap = logicFilterMap;
  }

}
